package io.bluefw.blueui.dsl;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

@Getter
@Setter
@NoArgsConstructor
public class Pagelet {
	private Entity entity;
	private Page page;
	
	public void setEntity(String entity) throws ClassNotFoundException {
		this.entity = new Entity(entity);
	}
	
	public StringBuffer render() {
		page.setEntity(entity);
		return page.render();
	}
}
